<pre class="docs-method-signature"><code>graph.isNeighbor(elementA, elementB [, opt])</code></pre>
<p>Return <code>true</code> if <code>elementB</code> is a neighbor of <code>elementA</code>. A neighbor of an element is another element connected to it via an inbound and/or outbound link.</p>

<p>Accepts several options, which may be provided inside an <code>opt</code> object:</p>

<ul>
	<li><code>deep</code> - return <code>true</code> also if <code>elementB</code> is a neighbor of an element embedded in <code>elementA</code>.</li>
	<li><code>outbound</code> - return <code>true</code> only if <code>elementB</code> is a succeeding neighbor of <code>elementA</code>. For example, if <code>elementB</code> is connected to a directed link <q>behind</q> the connection of <code>elementA</code>.</li>
	<li><code>inbound</code> - return <code>true</code> only if <code>elementB</code> is a preceding neighbor <code>elementA</code>. For example, if <code>elementB</code> is connected to a directed link <q>ahead of</q> the connection of <code>elementA</code>.</li>
	<li><code>indirect</code> - in addition to standard rules (including <code>deep</code>/<code>outbound</code>/<code>inbound</code> modifications), also return <code>true</code> if <code>elementB</code> can only be considered a neighbor of <code>elementA</code> if we go <q>against the flow</q> of directed links at link-link connections.</li>
</ul>
